<%@page import="models.RoleModel"%>
<%@page import="models.StaffModel"%>
<%@page import="java.util.ArrayList"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%
ArrayList<StaffModel> staffs = (ArrayList<StaffModel>) request.getAttribute("staffs");
String username = (String) request.getAttribute("username");
RoleModel role = (RoleModel) request.getAttribute("role");
%>

<jsp:include page="/admin/layouts/header.jsp">
    <jsp:param name="language" value="1" />
</jsp:include>

<script type="text/javascript" src="/admin/js/list_form.js"></script>
<script type="text/javascript" src="/admin/js/form_permission.js"></script>

		
		<div class="maincontent noright">
        	<div class="maincontentinner">
                <ul class="maintabmenu multipletabmenu">
                	<li class="current"><a href="/admin/system/permission">Phân quyền hệ thống</a></li>
                </ul><!--maintabmenu-->
                
                <div class="content">
					<jsp:include page="/admin/elements/message.jsp"/>
					
                    <form class="stdform" id="edit_config_form" action="" method="get">
                    	<p>
                        	<label>Chọn nhân viên</label>
                            <span class="field">
                            	<select name="username">
                            		<% for (int i = 0; i < staffs.size(); i++) { %>
                            		<option value="<%=staffs.get(i).getUsername()%>" <%=(username != null && username.equalsIgnoreCase(staffs.get(i).getUsername())) ? "selected=\"selected\"" : "" %>><%=staffs.get(i).getName() %> (<%=staffs.get(i).getUsername()%>)</option>
                            		<% } %>
                            	</select>
                            </span>
                        </p>
                        
                        <p class="stdformbutton">
                        	<button class="submit radius2">Xác nhận</button>
                        </p>
                        
                    </form>
                    
                    <br clear="all">
                    <br />
                    <% if (username != null) { %>
                    <form class="stdform stdform2" id="edit_config_form" action="" method="post">
                    	<div class="one_half">
                    		<div class="contenttitle">
		                    	<h2 class="form"><span>Tất cả các quyền</span></h2>
		                    </div><!--contenttitle-->
	                    	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0"></th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0"></th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">100</td>
			                        	<td>Có toàn quyền hệ thống admin</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("100") ? "checked" : "" %>"><input type="checkbox" name="permission" value="100" <%=role.getIds().contains("100") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <div class="one_half last"></div>
                        <br clear="all">
                        <br />
                        
                        <div class="one_half">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Phân quyền quản lý deal</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">200-201</td>
			                        	<td>Thống kê deal</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("200") ? "checked" : "" %>"><input type="checkbox" name="permission" value="200" <%=role.getIds().contains("200") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("201") ? "checked" : "" %>"><input type="checkbox" name="permission" value="201" <%=role.getIds().contains("201") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">202-203</td>
			                        	<td>Danh sách deal</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("202") ? "checked" : "" %>"><input type="checkbox" name="permission" value="202" <%=role.getIds().contains("202") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("203") ? "checked" : "" %>"><input type="checkbox" name="permission" value="203" <%=role.getIds().contains("203") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">204-205</td>
			                        	<td>Thêm deal</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("205") ? "checked" : "" %>"><input type="checkbox" name="permission" value="205" <%=role.getIds().contains("205") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">206-207</td>
			                        	<td>Quản lý deal quảng cáo</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("206") ? "checked" : "" %>"><input type="checkbox" name="permission" value="206" <%=role.getIds().contains("206") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("207") ? "checked" : "" %>"><input type="checkbox" name="permission" value="207" <%=role.getIds().contains("207") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <div class="one_half last">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Quản lý bán hàng</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">300-301</td>
			                        	<td>Quản lý đơn hàng</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("300") ? "checked" : "" %>"><input type="checkbox" name="permission" value="300" <%=role.getIds().contains("300") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("301") ? "checked" : "" %>"><input type="checkbox" name="permission" value="301" <%=role.getIds().contains("301") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">310-311</td>
			                        	<td>Bán hàng trực tiếp</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("311") ? "checked" : "" %>"><input type="checkbox" name="permission" value="311" <%=role.getIds().contains("311") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">320-321</td>
			                        	<td>Báo cáo doanh số display</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("320") ? "checked" : "" %>"><input type="checkbox" name="permission" value="320" <%=role.getIds().contains("320") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">330-331</td>
			                        	<td>Báo cáo doanh số chi tiết</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("330") ? "checked" : "" %>"><input type="checkbox" name="permission" value="330" <%=role.getIds().contains("330") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">340-341</td>
			                        	<td>Báo cáo doanh số theo saler</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("340") ? "checked" : "" %>"><input type="checkbox" name="permission" value="340" <%=role.getIds().contains("340") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <br clear="all">
                        <br />
                        
                        <div class="one_half">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Quản lý kho</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">400-401</td>
			                        	<td>Thêm sản phẩm</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("400") ? "checked" : "" %>"><input type="checkbox" name="permission" value="400" <%=role.getIds().contains("400") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("401") ? "checked" : "" %>"><input type="checkbox" name="permission" value="401" <%=role.getIds().contains("401") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">402-403</td>
			                        	<td>Danh sách sản phẩm</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("402") ? "checked" : "" %>"><input type="checkbox" name="permission" value="402" <%=role.getIds().contains("402") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">410</td>
			                        	<td>Lịch sử xuất nhập</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("410") ? "checked" : "" %>"><input type="checkbox" name="permission" value="410" <%=role.getIds().contains("410") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">420-421</td>
			                        	<td>Xuất hàng theo LOC</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("420") ? "checked" : "" %>"><input type="checkbox" name="permission" value="420" <%=role.getIds().contains("420") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("421") ? "checked" : "" %>"><input type="checkbox" name="permission" value="421" <%=role.getIds().contains("421") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">422-423</td>
			                        	<td>Trả hàng theo LOC</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("422") ? "checked" : "" %>"><input type="checkbox" name="permission" value="422" <%=role.getIds().contains("422") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("423") ? "checked" : "" %>"><input type="checkbox" name="permission" value="423" <%=role.getIds().contains("423") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <div class="one_half last">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Quản lý điều phối</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">500-501</td>
			                        	<td>Quản lý tuyến</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("500") ? "checked" : "" %>"><input type="checkbox" name="permission" value="500" <%=role.getIds().contains("500") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("501") ? "checked" : "" %>"><input type="checkbox" name="permission" value="501" <%=role.getIds().contains("501") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">503</td>
			                        	<td>Cấu hình tuyến</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("503") ? "checked" : "" %>"><input type="checkbox" name="permission" value="503" <%=role.getIds().contains("503") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">505</td>
			                        	<td>Xuất tuyến</td>
			                        	<td class="center"></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("505") ? "checked" : "" %>"><input type="checkbox" name="permission" value="505" <%=role.getIds().contains("505") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">506-507</td>
			                        	<td>Danh sách tuyến</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("506") ? "checked" : "" %>"><input type="checkbox" name="permission" value="506" <%=role.getIds().contains("506") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("507") ? "checked" : "" %>"><input type="checkbox" name="permission" value="507" <%=role.getIds().contains("507") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">521</td>
			                        	<td>Cập nhật LOC</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("521") ? "checked" : "" %>"><input type="checkbox" name="permission" value="521" <%=role.getIds().contains("521") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <br clear="all">
                        <br />
                        
                        <div class="one_half">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Quản lý marketing</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">600-601</td>
			                        	<td>Danh sách email marketing</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("600") ? "checked" : "" %>"><input type="checkbox" name="permission" value="600" <%=role.getIds().contains("600") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("601") ? "checked" : "" %>"><input type="checkbox" name="permission" value="601" <%=role.getIds().contains("601") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">602-603</td>
			                        	<td>Tạo email marketing</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("603") ? "checked" : "" %>"><input type="checkbox" name="permission" value="603" <%=role.getIds().contains("603") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">604-605</td>
			                        	<td>Thống kê email marketing</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("604") ? "checked" : "" %>"><input type="checkbox" name="permission" value="604" <%=role.getIds().contains("604") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">620-621</td>
			                        	<td>Danh sách email khách hàng</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("620") ? "checked" : "" %>"><input type="checkbox" name="permission" value="620" <%=role.getIds().contains("620") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("621") ? "checked" : "" %>"><input type="checkbox" name="permission" value="621" <%=role.getIds().contains("621") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">622-623</td>
			                        	<td>Import email vào hệ thống</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("623") ? "checked" : "" %>"><input type="checkbox" name="permission" value="623" <%=role.getIds().contains("623") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">624-625</td>
			                        	<td>Export email từ hệ thống</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("625") ? "checked" : "" %>"><input type="checkbox" name="permission" value="625" <%=role.getIds().contains("625") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <div class="one_half last">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Quản lý kế toán</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">700-701</td>
			                        	<td>Thu tiền giao nhận</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("700") ? "checked" : "" %>"><input type="checkbox" name="permission" value="700" <%=role.getIds().contains("700") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("701") ? "checked" : "" %>"><input type="checkbox" name="permission" value="701" <%=role.getIds().contains("701") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">710</td>
			                        	<td>Lương giao nhận</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("710") ? "checked" : "" %>"><input type="checkbox" name="permission" value="710" <%=role.getIds().contains("710") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <br clear="all">
                        <br />
                        
                        <div class="one_half">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Quản lý khác</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">800-801</td>
			                        	<td>Liên hệ hợp tác</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("800") ? "checked" : "" %>"><input type="checkbox" name="permission" value="800" <%=role.getIds().contains("800") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("801") ? "checked" : "" %>"><input type="checkbox" name="permission" value="801" <%=role.getIds().contains("801") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">810-811</td>
			                        	<td>Danh sách khu vực</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("810") ? "checked" : "" %>"><input type="checkbox" name="permission" value="810" <%=role.getIds().contains("810") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("811") ? "checked" : "" %>"><input type="checkbox" name="permission" value="811" <%=role.getIds().contains("811") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">812-813</td>
			                        	<td>Cập nhật khu vực</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("813") ? "checked" : "" %>"><input type="checkbox" name="permission" value="813" <%=role.getIds().contains("813") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">830-831</td>
			                        	<td>Danh sách danh mục</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("830") ? "checked" : "" %>"><input type="checkbox" name="permission" value="830" <%=role.getIds().contains("830") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("831") ? "checked" : "" %>"><input type="checkbox" name="permission" value="831" <%=role.getIds().contains("831") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">832-833</td>
			                        	<td>Cập nhật danh mục</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("833") ? "checked" : "" %>"><input type="checkbox" name="permission" value="833" <%=role.getIds().contains("833") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <div class="one_half last">
                        	<div class="contenttitle">
		                    	<h2 class="form"><span>Quản trị hệ thống</span></h2>
		                    </div><!--contenttitle-->
                        	<table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="list-table">
			                    <colgroup>
			                        <col class="con0">
			                        <col class="con1">
			                        <col class="con0">
			                        <col class="con1">
			                    </colgroup>
			                    <thead>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </thead>
			                    <tfoot>
			                        <tr>
			                        	<th class="head0">Id</th>
			                            <th class="head1">Tên quyền</th>
			                            <th class="head0">Xem</th>
			                            <th class="head1">Sửa</th>
			                        </tr>
			                    </tfoot>
			                    <tbody>
			                        <tr>
			                        	<td class="center">900-901</td>
			                        	<td>Danh sách nhân viên</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("900") ? "checked" : "" %>"><input type="checkbox" name="permission" value="900" <%=role.getIds().contains("900") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("901") ? "checked" : "" %>"><input type="checkbox" name="permission" value="901" <%=role.getIds().contains("901") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">902-903</td>
			                        	<td>Thêm nhân viên</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("903") ? "checked" : "" %>"><input type="checkbox" name="permission" value="903" <%=role.getIds().contains("903") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">920-921</td>
			                        	<td>Quản lý khách hàng</td>
			                        	<td class="center"><span class="checkbox <%=role.getIds().contains("920") ? "checked" : "" %>"><input type="checkbox" name="permission" value="920" <%=role.getIds().contains("920") ? "checked=\"checked\"" : "" %>></span></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("921") ? "checked" : "" %>"><input type="checkbox" name="permission" value="921" <%=role.getIds().contains("921") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <!-- 
			                        <tr>
			                        	<td class="center">940-941</td>
			                        	<td>Cấu hình chung</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("941") ? "checked" : "" %>"><input type="checkbox" name="permission" value="941" <%=role.getIds().contains("941") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">942-943</td>
			                        	<td>Cấu hình layout</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("943") ? "checked" : "" %>"><input type="checkbox" name="permission" value="943" <%=role.getIds().contains("943") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                         -->
			                        <tr>
			                        	<td class="center">960-961</td>
			                        	<td>Quản lý trang thông tin</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("961") ? "checked" : "" %>"><input type="checkbox" name="permission" value="961" <%=role.getIds().contains("961") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                        <tr>
			                        	<td class="center">990-991</td>
			                        	<td>Phân quyền hệ thống</td>
			                        	<td class="center"></td>
			                            <td class="center"><span class="checkbox <%=role.getIds().contains("991") ? "checked" : "" %>"><input type="checkbox" name="permission" value="991" <%=role.getIds().contains("991") ? "checked=\"checked\"" : "" %>></span></td>
			                        </tr>
			                    </tbody>
			                </table>
                        </div>
                        
                        <br clear="all">
                        <br />
                        
                        
                        <p class="stdformbutton">
                        	<button class="submit radius2">Xác nhận</button>
                        </p>
                        
                    </form>
                    
                    <br clear="all">
                    <% } %>
                </div><!--content-->
                
            </div><!--maincontentinner-->
            
            <jsp:include page="/admin/elements/copyright.jsp">
            	<jsp:param name="language" value="1" />
			</jsp:include>
            
        </div>

<jsp:include page="/admin/layouts/footer.jsp">
    <jsp:param name="language" value="1" />
</jsp:include>